#ifndef M3UHANDLER_H_
#define M3UHANDLER_H_

#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <map>

using namespace std;

class Channel{
public:
	Channel();
	Channel(string n, int c, string u,string type);
	void setValue(string n, int c, string u,string type);
	string getMediaType();
	string getName();
	string getUrl();
	int getCode();
private:
	int code;
	string mediaType;
	string url;
	string name;
};

class Playlist{
public:
	Playlist();
	Playlist(string fichier);
	void openFile();
	void addChannel(Channel c);
	void addChannel(string name, int code, string url,string mediaType);
	Channel getChannel(int pos);
	Channel chooseChannel();
	void configureList();
	void restoreList();
	unsigned int getNumberOfChannel();
private:
	string listFile;
	map<int,Channel> channelList;
};
#endif /* M3UHANDLER_H_ */
